<template>
	<view class="" style="width: 100vw;height: 100vh">
			<view class="container" style="min-height: 100vh;background:#F9F9F9;">
			<hx-navbar title="投票明细" :back="true" :fixedWhiteStyle="true" :fixed="false" :color="kblackColor" barPlaceholder="hidden"
					transparent="auto">
				</hx-navbar>
			<view class="content-list">
				<view class="item" v-for="item in list">
					<view class="item-row">
						<text class="text">投给{{item.worksNo}}</text>
						<text class="count">-{{item.ticket}}</text>
					</view>
					<view class="subtitle">场次：{{item.eventName}}</view>
					<view class="subtitle">支付时间：{{item.createTime}}</view>
				</view>
			</view>
		<view class="none_box" v-if="list.length == 0">
			<image  src="@/static/without.png" mode="widthFix"></image>
		</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[]
			}
		},
		onLoad() {
			this.getAiTicketLogList()
		},
		onReachBottom() {
		},
		onPullDownRefresh() {
			setTimeout(function() {
				uni.stopPullDownRefresh();
			}, 1000);
				this.getAiTicketLogList()
		},
		methods: {
			getAiTicketLogList(){
				this.$api.aiTicketLogList(res=>{
					this.list=res.data
					console.log("aiTicketLogList--",res);
				})
			}
		},			
	}
</script>

<style lang="scss" scoped>
	.container{
		// padding: 40rpx;
	}
	.content-list{
		width: 690rpx;margin: auto;
		display: flex;
		flex-direction: column;
		background: white;
		border-radius: 20rpx;
		.item {
			padding: 20rpx 0;
			margin: 0 30rpx;
			overflow: hidden;
			background-color: #FFFFFF;
			position: relative;
			border-bottom: 2rpx #E5E5E5 solid;
			.item-row{
				display: flex;
				flex-direction: row;
				align-items: center;
				.title{
					color: black;
					font-size: 26rpx;
					font-weight: bold;
				}
				.count{
					margin-top: 20rpx;
					margin-left: auto;
					color: #7354D5;
					font-size: 30rpx;
					font-weight: bold;	
				}
			}
			.subtitle{
				font-size: 24rpx;
				color: #A3A3A3;
			}
		}
	}
	.none_box {
		width: 534rpx;
		margin: 117rpx auto;
		font-size: 32rpx;
		color: #ABA9B4;
	}
	
	.none_box image {
		width: 100%;
		height: 534rpx;
		margin-bottom: 10rpx;
	}
	
</style>